//
//  CRBRotateBoxCustomChooseManage.m
//  ChampsARotate
//
//  Created by Login.Fan on 2018/11/2.
//  Copyright © 2018 Logan.Fan. All rights reserved.
//

#import "CRBRotateBoxCustomChooseManage.h"

@implementation CRBRotateBoxCustomChooseManage

static CRBRotateBoxCustomChooseManage *singleton;
+ (CRBRotateBoxCustomChooseManage *) shareManager {
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        singleton = [[self alloc] init];
    });
    return singleton;
}

- (void)resetData {
    _brandIndexPath = nil;
    _brandInfoModel = nil;
    _seriesIndexPath = nil;
    _seriesInfoModel = nil;
    _goodsIndexPath = nil;
    _goodsInfoModel = nil;
    _customSeriesName = nil;
    _customGoodsName = nil;
}

/** 品牌*/
- (void)saveBrandWithIndexPath:(NSIndexPath *)indexPath brandModel:(BrandInfoModel *)model{
    _brandIndexPath = indexPath;
    _brandInfoModel = model;
}

/** 系列*/
- (void)saveSeriesWithIndexPath:(NSIndexPath *)indexPath seriesModel:(CRBSeriesInfoModel *)model{
    // 点击这里说明画选择了列表里存在品牌，所以去除自定义品牌
    _seriesIndexPath = indexPath;
    _seriesInfoModel = model;
    _customSeriesName = nil;
}

/** 型号*/
- (void)saveGoodsWithIndexPath:(NSIndexPath *)indexPath goodsInfoModel:(goodVOsModel *)model {
    // 同上
    _goodsIndexPath = indexPath;
    _goodsInfoModel = model;
    _customGoodsName = nil;
}


@end
